package com.example.gateway.configuration;

import com.netflix.loadbalancer.PollingServerListUpdater;
import org.springframework.stereotype.Component;

/**
 * @author DestinyCc
 * @date 2022/4/15
 */
@Component("ribbonServerListUpdater")
public class CustomPollingServerListUpdater extends PollingServerListUpdater {
    private UpdateAction updateAction;

    @Override
    public synchronized void start(UpdateAction updateAction) {
        this.updateAction = updateAction;
        super.start(updateAction);
    }

    public UpdateAction getUpdateAction(){
        return updateAction;
    }
}
